#include <QtGui/QApplication>
#include "kpar.h"
#include "kapplication.h"
#include "kaboutdata.h"
#include <kcmdlineargs.h>
#include <kmessagebox.h>
#include <klocale.h>

#define version "0.4.5"

int main(int argc, char *argv[])
{
    KAboutData aboutData("kpar2",
                         "kpar2",
                         ki18n("Kpar2"),
                         version,
                         ki18n("Kpar2 tool"),
                         KAboutData::License_GPL,
                         ki18n("(c) 2009"),
                         ki18n("Frontend for libpar2 "),
                         "http://code.google.com/p/kpar2kde4/",
                         "maxime.chassagneux@gmail.com");

    aboutData.addAuthor(ki18n("valheru@facticius.net"), ki18n("Original author"), "valheru@facticius.net");
    aboutData.addAuthor(ki18n("Chassagneux Maxime"), ki18n("KDE 4 Port"), "maxime.chassagneux@gmail.com");

    KCmdLineArgs::init( argc, argv, &aboutData );
    KCmdLineOptions options;
    options.add("+[file]", ki18n("File to open"));
    KCmdLineArgs::addCmdLineOptions( options );
    KApplication app;
    KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
    int   i = 0;
    Kpar *w = new Kpar();
    w->show();
    if ( args->count() != 0 )
    {
        for (; i < args->count(); i++ )
        {
            w->openURL(args->url(i));
        }
    }
    return app.exec();
}
